<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html lang="zh-ch">
<head>
<meta charset="utf-8">
<title>简洛订餐系统-订单列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Loading Bootstrap -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<jsp:include page="/WEB-INF/views/inc/inc.jsp"></jsp:include>
</head>
<body style="zoom: 1;">
	<jsp:include page="/WEB-INF/views/inc/Header.jsp"></jsp:include>
	<div class="container" style="margin-top: 5px;">

		<div class="row border">
		    <div class="line">
				<div class="x6"
					style="padding-left: 10px; padding-top: 5px; padding-bottom: 5px; border-bottom: solid 1px #ccc; height: 45px;">
					日期：${date }</div>
				<div class="x6 text-right"
					style="border-bottom: solid 1px #ccc; height: 45px; padding-top: 5px;">
					<a class="button bg-white button-small" href="OrdersCalendarManager.nut?year=${year }&month=${month}"> <span
                        class="icon-mail-reply (alias)"></span> 返回
                    </a>
				</div>
			</div>
			<div class="tab ">
				<!-- Nav tabs -->
				<div class="tab-head">
					<ul class="tab-nav" role="tablist" id="myTab">
						<c:forEach var="item" items="${obj }" varStatus="ind">
							<li <c:if test="${ind.index == 0}">class="active"</c:if>><a
								href="#${item.key}" role="tab" data-toggle="tab">${item.key}</a></li>
						</c:forEach>
					</ul>
                </div>
				<!-- Tab panes -->
				<div class="tab-body border radius">
					<c:forEach var="item" items="${obj }" varStatus="mind">
						<div
							class='tab-panel <c:if test="${mind.index == 0}">active</c:if>'
							id="${item.key }">
							<table class="table table-striped">
								<thead>
									<tr>
										<th class="col-xs-2">菜名</th>
										<th class="col-xs-2">姓名</th>
										<th class="col-xs-5">部门</th>
										<th class="col-xs-1">份数</th>
										<th class="col-xs-1">单价</th>
										<th class="col-xs-1">金额</th>
									</tr>
								</thead>
								<tbody>
								    <c:set var="total" value="0" />
								    <c:set var="totalmoney" value="0" />
									<c:forEach var="order" items="${item.value }">
										<tr>
											<td>${order.mname }</td>
											<td>${order.userName }</td>
											<td>${order.department }</td>
											<td>${order.quantity }</td>
											<td>￥${order.menu.munitprice }</td>
											<td>￥${order.quantity * order.menu.munitprice }</td>
											<c:set var="total" value="${total + order.quantity}" />
											<c:set var="totalmoney" value="${totalmoney + (order.quantity * order.menu.munitprice)}" />
										</tr>
									</c:forEach>
									<tr>
                                            <td>总计：</td>
                                            <td></td>
                                            <td></td>
                                            <td>${total }</td>
                                            <td></td>
                                            <td>￥${totalmoney }</td>
                                        </tr>
								</tbody>
							</table>
						</div>
					</c:forEach>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="/WEB-INF/views/inc/Inc01.jsp"></jsp:include>
</body>
</html>